package com.cap.dreamcircle.View.Adapter.Item;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.cap.dreamcircle.Common.RecyclerView.BaseItem;
import com.cap.dreamcircle.Model.Bean.DreamLabelDetailEntity;
import com.cap.dreamcircle.R;

/**
 * Created by liucxu on 2017/8/24.
 */

public class DreamLableDetailItem extends BaseItem<DreamLabelDetailEntity> {

    DreamLabelDetailEntity dreamLabelDetailEntity;
    private TextView tv_dream_label;
    private TextView tv_dream_label_detail;

    public DreamLableDetailItem(ViewGroup parent) {
        super(parent);
    }

    @Override
    public int getRes() {
        return R.layout.adapter_dream_label_stream;
    }

    @Override
    public void onCreateView(View rootView) {
        tv_dream_label = (TextView) rootView.findViewById(R.id.tv_dream_label);
        tv_dream_label_detail = (TextView) rootView.findViewById(R.id.tv_dream_label_detail);
    }

    @Override
    public void onBindView(DreamLabelDetailEntity entity) {
        this.dreamLabelDetailEntity = entity;
        tv_dream_label.setText(dreamLabelDetailEntity.getTitle());
        tv_dream_label_detail.setText(dreamLabelDetailEntity.getDreamResultDesc());
    }
}
